#! /usr/bin/env python
 
PACKAGE='dbw_mkz_twist_controller'

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

#       Name                 Type         Description                         Default
gen.add("pub_pedals",        bool_t,   0, "Publish throttle and brake",       True)
gen.add("pub_steering",      bool_t,   0, "Publish steering",                 True)

#       Name                 Type         Description                         Default   Min     Max
gen.add("decel_max",         double_t, 0, "Deceleration limit (m/s^2)",       3.0,      0.0,    8.0)
gen.add("accel_max",         double_t, 0, "Acceleration limit (m/s^2)",       3.0,      0.0,    8.0)
gen.add("max_lat_accel",     double_t, 0, "Maximum lateral accel (m/s^2)",    8.0,      0.0,    10.0)
gen.add("steer_kp",          double_t, 0, "Steering feedback using gyro",     0.0,      0.0,    100.0)
gen.add("wheel_radius",      double_t, 0, "Effective tire radius (m)",        0.33,     0.1,    0.5)
gen.add("vehicle_mass",      double_t, 0, "Vehicle mass (kg)",                1736.35,  1650.0, 1800.0)
gen.add("fuel_capacity",     double_t, 0, "Fuel tank capacity (gallons)",     13.5,     10.0,   20.0)
gen.add("speed_kp",          double_t, 0, "Speed loop proportional gain",     2.0,      0.0,    100.0)
gen.add("accel_kp",          double_t, 0, "Accel loop proportional gain",     0.4,      0.0,    8.0)
gen.add("accel_ki",          double_t, 0, "Accel loop integral gain",         0.1,      0.0,    8.0)
gen.add("brake_deadband",    double_t, 0, "Minimum decel for brakes (m/s^2)", 0.1,      0.0,    1.0)
gen.add("accel_tau",         double_t, 0, "LPF time constant (s)",            0.5,      0.0,    10.0)

exit(gen.generate(PACKAGE, PACKAGE, "Controller"))
